/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.ohyessoftware.sigc.infra.negocio;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author Diego
 * 01/06/2011
 */
@Entity
@Table(name = "telefone_cliente", schema = "sigc")
public class TelefoneCliente implements Serializable {

    private static final long serialVersionUID = 1L;

    //atributos
    /******************************************************************************/
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "cod_telefone")
    private Long codTelefone;
    @Column(name = "ddd")
    private String ddd;
    @Column(name = "numero")
    private String numero;
    @Column(name = "descricao")
    private String descricao;

    //relacoes
    /******************************************************************************/
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "cod_cliente", insertable = true, updatable = true)
    public Cliente cliente;
    
    //get e set
    /******************************************************************************/
    public Long getCodTelefone() {
        return codTelefone;
    }

    public void setCodTelefone(Long codTelefone) {
        this.codTelefone = codTelefone;
    }

    public String getDdd() {
        return ddd;
    }

    public void setDdd(String ddd) {
        this.ddd = ddd;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public String getNumero() {
        return numero;
    }

    public void setNumero(String numero) {
        this.numero = numero;
    }

    public Cliente getCliente() {
        return cliente;
    }

    public void setCliente(Cliente cliente) {
        this.cliente = cliente;
    }

}
